package jtk.project4.fleet.ibatis.dao;

import java.sql.SQLException;
import java.util.List;

import jtk.project4.fleet.domain.ListType;
import jtk.project4.fleet.domain.Vendor;

public class ListTypeDao extends IbatisDao{
	
	public List selectListType() throws SQLException {
		List selectListType = null;
			selectListType =getSqlMap().queryForList("SELECT_ALL_LISTTYPE", null);
		return selectListType;
	}

	public int deleteListType(ListType ListType) throws SQLException{
		return (int) getSqlMap().delete("DELETE_LISTTYPE", ListType);
	}
	
	public int updateListType(ListType ListType) throws SQLException{
		return (int) getSqlMap().update("UPDATE_LISTTYPE", ListType);
	}
	
	public ListType insertListType(ListType ListType) throws SQLException{
		return (ListType) getSqlMap().insert("INSERT_LISTTYPE", ListType);
	}
	
	public ListType insertListTypeType(ListType ListType) throws SQLException {
		return (ListType) getSqlMap().insert("INSERT_LISTTYPE",ListType);
	}
	
		public List selectListTypeType() throws SQLException {
		return getSqlMap().queryForList("SELECT_ALL_LISTTYPE_TYPE", null);
	}
	
		
	public static void main (String args[]) throws SQLException{
		ListType ListType;
		ListType = new ListType();
		ListType.setDesc("coba dari main");
		new ListTypeDao().insertListType(ListType);
		}
	

}
